package com.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dao.RoleDao;
import com.github.yulichang.base.MPJBaseServiceImpl;
import com.pojo.Role;
import com.service.RoleService;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RoleServiceImpl extends MPJBaseServiceImpl<RoleDao, Role> implements RoleService {
    @Resource
    private RoleDao roleDao;

    @Override
    public List<Role> getRoleList(){
        QueryWrapper<Role> wrapper = new QueryWrapper<Role>();
        wrapper.select("rId","rState","rName","rDescription");
        List<Role> roles = roleDao.selectList(wrapper);
        return roles;
    }
}
